<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('scenes', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('project_id')->default(0)->index();
            $table->unsignedBigInteger('user_id')->index()->default(0)->comment('记录人');
            $table->date('date')->nullable()->comment('日期');
            $table->string('leader')->nullable()->default('/')->comment('班组长');
            $table->string('area')->nullable()->default('/')->comment('施工区域');
            $table->unsignedInteger('numbers')->nullable()->default(0)->comment('施工人数');
            $table->string('workload')->nullable()->default('/')->comment('完成工作量');
            $table->string('files')->nullable()->default('')->comment('施工过程中照片');
            $table->unsignedInteger('total')->default(0)->comment('各累计人数');
            $table->string('remarks')->nullable()->default('/')->comment('备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('scenes');
    }
};
